1 Introduction

We explore the data as outlined in the Table Of Contents.

If you wish to read the Report in the form of a Book, please visit Little Book on Data Visualization

2 Read the Data

library(tidyverse)
library(leaflet)
library(stringr)
library(rgdal)
library(lubridate)
library(forecast)
library(DT)
library(prophet)

rm(list=ls())

fillColor = "#FFA07A"
fillColor2 = "#F1C40F"

LACrime = read_csv("../input/Crime_Data_2010_2017.csv")

3 Seperate Latitude and Longitude from Location Field

The Location field has the format (Latitude,Longitude). We create 2 fields Latitude and Longitude from the Location field. We would be using these newly formed fields in the maps shown below.

LACrime_latlong = gsub('\\(','',LACrime$Location)
LACrime_latlong = gsub('\\)','',LACrime_latlong)

LACrime_latlong = str_split(LACrime_latlong,",")

LACrime_latlong = do.call(rbind.data.frame, LACrime_latlong)

colnames(LACrime_latlong) = c("latitude","longitude")

LACrime$latitude = as.numeric(as.character(LACrime_latlong$latitude))
LACrime$longitude = as.numeric(as.character(LACrime_latlong$longitude))

rm(LACrime_latlong)

LACrime = LACrime %>%
  select(-Location)

4 Rename the Fields to remove Spaces in between Fields

LACrime = LACrime %>%
  rename(DRNumber = `DR Number`) %>%
  rename(DateReported = `Date Reported`) %>%
  rename(DateOccurred = `Date Occurred`) %>%
  rename(TimeOccurred = `Time Occurred`) %>%
  rename(AreaID = `Area ID`) %>%
  rename(AreaName = `Area Name`) %>%
  rename(ReportingDistrict = `Reporting District`) %>%
  rename(CrimeCode = `Crime Code`) %>%
  rename(CrimeCodeDescription = `Crime Code Description`) %>%
  rename(MOCodes = `MO Codes`) %>%
  rename(VictimAge = `Victim Age`) %>%
  rename(VictimSex = `Victim Sex`) %>%
  rename(VictimDescent = `Victim Descent`) %>%
  rename(PremiseCode = `Premise Code`) %>%
  rename(PremiseDescription = `Premise Description`) %>%
  rename(WeaponUsedCode = `Weapon Used Code`) %>%
  rename(WeaponDescription = `Weapon Description`) %>%
  rename(StatusCode = `Status Code`) %>%
  rename(StatusDescription = `Status Description`) %>%
  rename(CrimeCode1 = `Crime Code 1`) %>%
  rename(CrimeCode2 = `Crime Code 2`) %>%
  rename(CrimeCode3 = `Crime Code 3`) %>%
  rename(CrimeCode4 = `Crime Code 4`) %>%
  rename(CrossStreet = `Cross Street`) 

5 Month of Crime

LACrime$MonthOfCrime =  month.abb[month(mdy(LACrime$DateOccurred))]

LACrime %>%
  group_by(MonthOfCrime) %>%
  summarise(CountIncidents = n()) %>%
  mutate(MonthOfCrime = reorder(MonthOfCrime,CountIncidents)) %>%
  
ggplot(aes(x = MonthOfCrime,y = CountIncidents)) +
  geom_bar(stat='identity',colour="white", fill =fillColor) +
  geom_text(aes(x = MonthOfCrime, y = 1, label = paste0("(",CountIncidents,")",sep="")),
            hjust=0, vjust=.5, size = 4, colour = 'black',
            fontface = 'bold') +
  labs(x = 'Month Of Crime', y = 'Count of Incidents', 
       title = 'Count of Incidents') +
  coord_flip() + 
  theme_bw()

We observe that the months of November and December have the lowest crimes.

6 Day of Crime

LACrime$DayOfCrime =  wday(mdy(LACrime$DateOccurred),label = TRUE)

LACrime %>%
  group_by(DayOfCrime) %>%
  summarise(CountIncidents = n()) %>%
  mutate(DayOfCrime = reorder(DayOfCrime,CountIncidents)) %>%
  
  ggplot(aes(x = DayOfCrime,y = CountIncidents)) +
  geom_bar(stat='identity',colour="white", fill =fillColor2) +
  geom_text(aes(x = DayOfCrime, y = 1, label = paste0("(",CountIncidents,")",sep="")),
            hjust=0, vjust=.5, size = 4, colour = 'black',
            fontface = 'bold') +
  labs(x = 'Day Of Crime', y = 'Count of Incidents', 
       title = 'Count of Incidents') +
  coord_flip() + 
  theme_bw()

We observe that Friday has the highest crimes.

7 Time of Crime

7.1 Most Crimes

The plot shows the hours of the day where most crimes occur.

LACrime %>%
  group_by(TimeOccurred) %>%
  summarise(CountIncidents = n()) %>%
  arrange(desc(CountIncidents)) %>%
  mutate(TimeOccurred = as.integer(TimeOccurred)) %>%
  mutate(TimeOccurred = reorder(TimeOccurred,CountIncidents)) %>%
  head(10) %>%
  
  ggplot(aes(x = TimeOccurred,y = CountIncidents)) +
  geom_bar(stat='identity',colour="white", fill =fillColor) +
  geom_text(aes(x = TimeOccurred, y = 1, label = paste0("(",CountIncidents,")",sep="")),
            hjust=0, vjust=.5, size = 4, colour = 'black',
            fontface = 'bold') +
  labs(x = 'Time Of Crime', y = 'Count of Incidents', 
       title = 'Count of Incidents') +
  coord_flip() + 
  theme_bw()

Crimes occur mostly at 1200 hrs. Very Strange!, why would someone commit crime so much at the middle of the day, rather than at night.

7.2 Least Crimes

LACrime %>%
  group_by(TimeOccurred) %>%
  summarise(CountIncidents = n()) %>%
  arrange(desc(CountIncidents)) %>%
  mutate(TimeOccurred = as.integer(TimeOccurred)) %>%
  mutate(TimeOccurred = reorder(TimeOccurred,CountIncidents)) %>%
  tail(10) %>%
  
  ggplot(aes(x = TimeOccurred,y = CountIncidents)) +
  geom_bar(stat='identity',colour="white", fill =fillColor) +
  geom_text(aes(x = TimeOccurred, y = 1, label = paste0("(",CountIncidents,")",sep="")),
            hjust=0, vjust=.5, size = 4, colour = 'black',
            fontface = 'bold') +
  labs(x = 'Time Of Crime', y = 'Count of Incidents', 
       title = 'Count of Incidents') +
  coord_flip() + 
  theme_bw()

Crimes occur least at round 700 hrs. Is it because, people have woken up and getting ready for crime ? This is really interesting.

7.3 Crime Types at 1200 hrs

We examine the different crime types that occur at 1200 hrs since this is the time most crimes occur.

LACrime %>%
  filter(TimeOccurred == 1200) %>%
  group_by(CrimeCodeDescription) %>%
  summarise(CountIncidents = n()) %>%
  arrange(desc(CountIncidents)) %>%
  mutate(CrimeCodeDescription = reorder(CrimeCodeDescription,CountIncidents)) %>%
  head(10) %>%
  
  ggplot(aes(x = CrimeCodeDescription,y = CountIncidents)) +
  geom_bar(stat='identity',colour="white", fill = c("red")) +
  geom_text(aes(x = CrimeCodeDescription, y = 1, label = paste0("(",CountIncidents,")",sep="")),
            hjust=0, vjust=.5, size = 4, colour = 'white',
            fontface = 'bold') +
  labs(x = 'Time Of Crime', y = 'Count of Incidents', 
       title = 'Type of Crime at 1200 hrs') +
  coord_flip() + 
  theme_bw()

Theft of Identity is the most common crime type which happens during this time.

8 Sex of the Victims

LACrime %>%
  filter(!is.na(VictimSex)) %>%
  group_by(VictimSex) %>%
  tally() %>%
  ungroup() %>%
  mutate(VictimSex = reorder(VictimSex,n)) %>%
  
  ggplot(aes(x = VictimSex,y = n)) +
  geom_bar(stat='identity',colour="white", fill =fillColor) +
  geom_text(aes(x = VictimSex, y = 1, label = paste0("(",n,")",sep="")),
            hjust=0, vjust=.5, size = 4, colour = 'black',
            fontface = 'bold') +
  labs(x = 'Sex', y = 'Count of Incidents', 
       title = 'Count of Incidents and Sex') +
  coord_flip() + 
  theme_bw()

It is evident that there are More Males involved than the Females.

9 Age and Sex of the Victims

We examine the age and sex of the Victims involved in Crime.

breaks = seq(0,100,5)

ListSex = c("M","F")

LACrime %>%
  filter( VictimSex %in% ListSex ) %>%
  ggplot(aes(VictimAge)) +
  geom_histogram(binwidth = 5,fill = c("red")) +
  facet_wrap(~ VictimSex) +
  scale_x_continuous(limits = c(0, 100),breaks=breaks ) +
  labs(x = 'Victim Age', y = 'Count of Crimes', 
       title = 'Age , Sex and Crimes') +
  theme_bw()

Most Victims are around the age 25 to 30.It is evident that Females are Victimised more than Males in the age group 25 to 30.

10 Sex and Types of Crime

We examine the Types of Crime the males and females are being involved in. For the sake of clarity, we plot only the top Ten Sex and Crime Type numbers in the bar plot. Let’s see whether we find any interesting observation.

LACrime %>%
  filter(!is.na(VictimSex)) %>%
  group_by(VictimSex,CrimeCodeDescription) %>%
  tally() %>%
  ungroup() %>%
  mutate(VictimSex = reorder(VictimSex,n)) %>%
  arrange(desc(n)) %>%
  head(10) %>%
  
  ggplot(aes(x = VictimSex,y = n, fill =CrimeCodeDescription)) +
  geom_bar(stat='identity') +
  labs(x = 'Sex and Crime Description', y = 'Count of Incidents', 
       title = 'Count of Incidents and Sex and Crime Description') +
  coord_flip() + 
  theme_bw() + theme(legend.position="top")

We observe for Females we have the Category Intimate Partner - Simple Assault which we do not have for Males.

11 Crime Types for persons aged 70 and above

We examine the Crime Types commited with persons aged 70 and above.

LACrime %>%
  filter(!is.na(VictimSex)) %>%
  filter(VictimAge >= 70) %>%
  group_by(VictimSex,CrimeCodeDescription) %>%
  tally() %>%
  ungroup() %>%
  mutate(VictimSex = reorder(VictimSex,n)) %>%
  arrange(desc(n)) %>%
  head(10) %>%

  ggplot(aes(x = VictimSex,y = n,fill = CrimeCodeDescription)) +
  geom_bar(stat='identity') +
  labs(x = 'Sex and Crime Description', y = 'Count of Incidents', 
       title = 'Count of Incidents and Sex and Crime Description for Persons 70 and above') +
  coord_flip() + 
  theme_bw() + theme(legend.position="top")

We observer that Theft of Identity and Burglary are the Two Important Crime Types commited with persons aged 70 and above.

12 Crimes at different Premises

We investigate how the crimes are distributed among different places or Premises.

LACrime %>%
  filter(!is.na(PremiseDescription)) %>%
  group_by(PremiseDescription) %>%
  tally() %>%
  ungroup() %>%
  mutate(PremiseDescription = reorder(PremiseDescription,n)) %>%
  arrange(desc(n)) %>%
  head(20) %>%

  ggplot(aes(x = PremiseDescription,y = n)) +
  geom_bar(stat='identity',colour="white", fill =fillColor2) +
  geom_text(aes(x = PremiseDescription, y = 1, label = paste0("(",n,")",sep="")),
            hjust=0, vjust=.5, size = 4, colour = 'black',
            fontface = 'bold') +
  labs(x = 'PremiseDescription', y = 'Count of Incidents', 
       title = 'Count of Incidents and PremiseDescription') +
  coord_flip() + 
  theme_bw()

Street , Single family dwelling , Multi unit bwelling, Parking lot rank among the top places for Crimes.

13 Types of Crimes at different Premises

We examine the Crime Types at different Premises.

LACrime %>%
  filter(!is.na(PremiseDescription)) %>%
  group_by(PremiseDescription,CrimeCodeDescription) %>%
  tally() %>%
  ungroup() %>%
  mutate(PremiseDescription = reorder(PremiseDescription,n)) %>%
  arrange(desc(n)) %>%
  head(10) %>%
  
  ggplot(aes(x = PremiseDescription,y = n, fill =CrimeCodeDescription)) +
  geom_bar(stat='identity') +
  labs(x = 'Premise Description and Crime Description', y = 'Count of Incidents', 
       title = 'Count of Incidents and Premise Description and Crime Description') +
  coord_flip() + 
  theme_bw()

14 Victim Descent Analysis

We examine the Descent of the Victims in the barplot.

VictimDescentAbbr = c("A","B","C","D","F","G","H","I","J","K","L","O","P","S","U","V","W","X","Z")
VictimDescentDescription = c("Other Asian","Black",
                             "Chinese","Cambodian","Filipino",
                             "Guamanian","Hispanic/Latin/Mexican",
                             "American Indian/Alaskan Native",
                             "Japanese","Korean","Laotian ",
                             "Other","Pacific Islander",
                             "Samoan","Hawaiian","Vietnamese",
                             "White","Unknown","AsianIndian")

VictimDescentFull = data.frame(VictimDescent = as.character(VictimDescentAbbr),
                               VictimDescentDescription = as.character(VictimDescentDescription))

LACrime$VictimDescent = as.character(LACrime$VictimDescent)

LACrime %>%
  filter(!is.na(VictimDescent)) %>%
  group_by(VictimDescent) %>%
  tally() %>%
  ungroup() %>%
  arrange(desc(n)) %>%
  inner_join(VictimDescentFull) %>%
  head(10) %>%
  mutate(VictimDescentDescription = reorder(VictimDescentDescription,n)) %>%
  
  ggplot(aes(x = VictimDescentDescription,y = n)) +
 geom_bar(stat='identity',colour="white", fill =fillColor2) +
 geom_text(aes(x = VictimDescentDescription, y = 1, label = paste0("(",n,")",sep="")),
           hjust=0, vjust=.5, size = 4, colour = 'black',
           fontface = 'bold') +
 labs(x = 'VictimDescent', y = 'Count of Incidents', 
      title = 'Count of Incidents and VictimDescent') +
 coord_flip() + 
 theme_bw()

We observe Hispanic, White and Black are the top categories where the Victims are present.

15 Analysis of Weapons used in Crime

#WeaponDescription

LACrime %>%
  filter(!is.na(WeaponDescription)) %>%
  group_by(WeaponDescription) %>%
  tally() %>%
  ungroup() %>%
  arrange(desc(n)) %>%
  head(10) %>%
  mutate(WeaponDescription = reorder(WeaponDescription,n)) %>%
  
  ggplot(aes(x = WeaponDescription,y = n)) +
  geom_bar(stat='identity',colour="white", fill =fillColor2) +
  geom_text(aes(x = WeaponDescription, y = 1, label = paste0("(",n,")",sep="")),
            hjust=0, vjust=.5, size = 4, colour = 'black',
            fontface = 'bold') +
  labs(x = 'Weapon Description', y = 'Count of Incidents', 
       title = 'Count of Incidents and Weapon Description') +
  coord_flip() + 
  theme_bw()

16 Map the Crime Sites

center_lon = median(LACrime$longitude,na.rm = TRUE)
center_lat = median(LACrime$latitude,na.rm = TRUE)

LACrimeSample = LACrime %>% sample_n(50e3)

leaflet(LACrimeSample) %>% addProviderTiles("Esri.NatGeoWorldMap") %>%
  addCircles(lng = ~longitude, lat = ~latitude, 
             color = c("red"))  %>%
  # controls
  setView(lng=center_lon, lat=center_lat, zoom=10)

We observe that there are clusters of areas where Crime happens. Areas like Burbank, Santa Monica, Rancho Palos Verdes,Redondo Beach have less crimes or no crimes at all.

17 Reporting District Incidents

We examine the Reporting Districts which report the maximum number of Crimes. The bar plot shows the Top 20 Reporting Districts which report Crimes.

RDGeoLocation = LACrime %>% 
  group_by(ReportingDistrict) %>%
  summarise(RDlat = median(latitude,na.rm = TRUE)
            ,RDlon = median(longitude,na.rm = TRUE)
            ,CountIncidents = n()) %>%
  arrange(desc(CountIncidents)) %>%
  head(50)
  
head(RDGeoLocation,20) %>%
  mutate(ReportingDistrict = reorder(ReportingDistrict,CountIncidents)) %>%
  ggplot(aes(x = ReportingDistrict,y = CountIncidents)) +
  geom_bar(stat='identity',colour="white", fill =fillColor) +
  geom_text(aes(x = ReportingDistrict, y = 1, label = paste0("(",CountIncidents,")",sep="")),
            hjust=0, vjust=.5, size = 4, colour = 'black',
            fontface = 'bold') +
  labs(x = 'ReportingDistrict', y = 'Count of Incidents', 
       title = 'Count of Incidents in Reporting District') +
  coord_flip() + 
  theme_bw()

18 Map of the Reporting District Incidents

The Map shows the Reporting District with the circle size representing the number of incidents in the areas.

leaflet(RDGeoLocation) %>% addProviderTiles("Esri.NatGeoWorldMap") %>%
  addCircles(lng = ~RDlon, lat = ~RDlat, radius = ~sqrt(CountIncidents)*30,
             color = c("red"))  %>%
  # controls
  setView(lng=center_lon, lat=center_lat, zoom=10)

19 Map of the Reporting Districts with their Crimes

We investigate the Crimes associated with the Reporting Districts.

RDGeoLocationFull = LACrime %>% 
  group_by(ReportingDistrict) %>%
  summarise(RDlat = median(latitude,na.rm = TRUE)
            ,RDlon = median(longitude,na.rm = TRUE)
            ,CountIncidents = n())

RD = readOGR(dsn = "../input/LAPD_Reporting_Districts.shp")
## OGR data source with driver: ESRI Shapefile 
## Source: "../input/LAPD_Reporting_Districts.shp", layer: "LAPD_Reporting_Districts"
## with 1135 features
## It has 7 fields
## Integer64 fields read as strings:  OBJECTID REPDIST PREC
RD@data$REPDIST = as.numeric(RD@data$REPDIST )
RDGeoLocationFull$ReportingDistrict = as.numeric(RDGeoLocationFull$ReportingDistrict)

RD@data = left_join(RD@data, RDGeoLocationFull, by = c("REPDIST" = "ReportingDistrict"))

bins = c(0,1000,2000, 4000, 5000, 6000, 7000,8000, 9000)

pal = colorBin("YlOrRd", domain = RD@data$CountIncidents, bins = bins)

labels = sprintf(
  "<strong>%s</strong><br/>%g",
  RD@data$REPDIST, RD@data$CountIncidents
) %>% lapply(htmltools::HTML)

center_lon = median(RD@data$RDlon,na.rm = TRUE)
center_lat = median(RD@data$RDlat,na.rm = TRUE)

leaflet(data = RD) %>%  setView(lng=center_lon, lat=center_lat, zoom=12) %>%
  addPolygons(
    fillColor = ~pal(CountIncidents),
    weight = 2,
    opacity = 1,
    color = "white",
    dashArray = "3",
    fillOpacity = 0.7,
    highlight = highlightOptions(
      weight = 5,
      color = "#666",
      dashArray = "",
      fillOpacity = 0.7,
      bringToFront = TRUE),
    label = labels,
    labelOptions = labelOptions(
      style = list("font-weight" = "normal", padding = "3px 8px"),
      textsize = "15px",
      direction = "auto")) %>%
  addLegend(pal = pal, values = ~CountIncidents, opacity = 0.7, title = "Reporting Districts and Crimes",
            position = "bottomleft")

20 Type of Crime Analysis

We examine the various types of Crime and plot the Top 20 Crimes in the bar plot.

LACrime %>%
  group_by(CrimeCodeDescription) %>%
  tally() %>%
  arrange(desc(n)) %>%
  head(20) %>%
  mutate(CrimeCodeDescription = reorder(CrimeCodeDescription,n)) %>%
  
  ggplot(aes(x = CrimeCodeDescription,y = n)) +
  geom_bar(stat='identity',colour="white", fill =fillColor2) +
  geom_text(aes(x = CrimeCodeDescription, y = 1, label = paste0("(",n,")",sep="")),
            hjust=0, vjust=.5, size = 4, colour = 'black',
            fontface = 'bold') +
  labs(x = 'CrimeCodeDescription', y = 'Count of Incidents', 
       title = 'Count of Incidents and CrimeCodeDescription') +
  coord_flip() + 
  theme_bw()

Battery - Simple Assault , Burglary from Vehicle , Vehicle -Stolen , Burglary and Theft -Plain Petty are among the most common crimes.

21 Type of Crime and Reporting District

We examine the various types of Crime happenning in the Reporting Districts. We plot the Top 20 items in the bar plot.

LACrime %>%
  group_by(CrimeCodeDescription,ReportingDistrict) %>%
  tally() %>%
  arrange(desc(n)) %>%
  head(20) %>%
  mutate(ReportingDistrict = reorder(ReportingDistrict,n))  %>%
  
  ggplot(aes(x = ReportingDistrict,y = n,fill = CrimeCodeDescription)) +
  geom_bar(stat='identity',colour="white") +
  labs(x = 'ReportingDistrict', y = 'Count of Incidents', 
       title = 'ReportingDistrict and CrimeCodeDescription') +
  coord_flip() + 
  theme_bw() +  theme(legend.position="top")

Shoplifting Petty Theft and Theft Plain are the Top Two most Common Crimes.

22 Trend of Crimes

We examine the Trend of the Crimes from 2010 onwards

LACrimeGroup = LACrime %>%
  mutate(year_month = make_date(year=year(mdy(DateOccurred)),month=month(mdy(DateOccurred))) ) %>% 
  filter(!is.na(year_month)) %>%
  group_by(year_month) %>% summarize(CountCrimes = n()) 

LACrimeGroup %>% filter(year_month != "2017-09-01") %>%
  ggplot(aes(x=year_month,y=CountCrimes)) + 
  geom_line(size=.5, color="red")+geom_point(size=2, color="red")+theme_bw()

The crimes are increasing from 2014 onwards.

23 Trend of Battery - Simple Assault

We examine the Trend of the Crime Battery - Simple Assault from 2010 onwards. We choose this Crime Type since it is the most commonly occuring Crime Type.We exclude the last Month since it might be a outlier.

LACrimeGroupBatterySA = LACrime %>% 
  filter(CrimeCode == 624) %>%
  mutate(year_month = make_date(year=year(mdy(DateOccurred)),month=month(mdy(DateOccurred))) ) %>% 
  filter(!is.na(year_month)) %>%
  filter(year_month != "2017-09-01") %>%
  group_by(year_month) %>% 
  summarize(CountCrimes = n())  

LACrimeGroupBatterySA %>% filter(year_month != "2017-09-01") %>%
  ggplot(aes(x=year_month,y=CountCrimes)) + 
  geom_line(size=.5, color="red")+geom_point(size=2, color="red")+theme_bw()

24 Predictions using ARIMA for Battery - Simple Assault

We predict the Crimes for the Battery - Simple Assault for the months of September to December 2017 using ARIMA.

CountOfCrimes = ts(LACrimeGroupBatterySA$CountCrimes)

fit = auto.arima(CountOfCrimes,stepwise=FALSE, approximation=FALSE)

predictions = fit %>% forecast(h=4)

predictions %>% autoplot(include=80) +theme_bw()

The predictions for months of September to December 2017 using ARIMA are shown here.

25 Predictions using ETS for Battery - Simple Assault

We predict the Crimes for the Battery - Simple Assault for the months of September to December 2017 using ETS.

CountOfCrimes = ts(LACrimeGroupBatterySA$CountCrimes)

fit = ets(CountOfCrimes)

predictions = fit %>% forecast(h=4)

predictions %>% autoplot(include=80) +theme_bw()

The predictions for months of September to December 2017 using ETS are shown here.

26 Predictions using Prophet for Battery - Simple Assault

We predict the Crimes for the Battery - Simple Assault for the months of September to December 2017 using Prophet.

colnames(LACrimeGroupBatterySA) = c("ds","y")

m <- prophet(LACrimeGroupBatterySA,changepoint.prior.scale = 0.1)
## Initial log joint probability = -2.43405
## Optimization terminated normally: 
##   Convergence detected: relative gradient magnitude is below tolerance
future <- make_future_dataframe(m, periods = 4,freq = "month")

forecast <- predict(m, future)

predictionsValues = tail(forecast$yhat,4)

dataSetCrimes = data.frame(Month = as.character(), CrimeCount = as.numeric())

dataSetMonths = data.frame(c("September 2017",
                             "October 2017",
                             "November 2017",
                             "December 2017"))

dataSetCrimes = cbind(dataSetMonths,round(predictionsValues))

colnames(dataSetCrimes) = c("Months","Predictions")

datatable(dataSetCrimes, style="bootstrap", class="table-condensed", options = list(dom = 'tp',scrollX = TRUE))